gdk/x11/gdkkeys-x11.c (get_direction): Don't call g_strcasecmp on NULL strings. ...
authorMatthias Clasen <matthiasc@src.gnome.org>
Fri, 7 Sep 2001 11:43:20 +0000 (11:43 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 7 Sep 2001 11:43:20 +0000 (11:43 +0000)
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/x11/gdkkeys-x11.c

index d037cd88794970e739071fa7aff4b87b355204a4..90fee00cbd26eef3b1dd03646767038999292259 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Sep  7 12:48:56 2001  Matthias Clasen  <matthiasc@poet.de>
+
+       * gdk/x11/gdkkeys-x11.c (get_direction): Don't call
+       g_strcasecmp on NULL strings. (#59058)
+
 2001-09-06  Alex Larsson  <alexl@redhat.com>
 
        * gtk/gtkbin.c:
index d037cd88794970e739071fa7aff4b87b355204a4..90fee00cbd26eef3b1dd03646767038999292259 100644 (file)
@@ -1,3 +1,8 @@
+Fri Sep  7 12:48:56 2001  Matthias Clasen  <matthiasc@poet.de>
+
+       * gdk/x11/gdkkeys-x11.c (get_direction): Don't call
+       g_strcasecmp on NULL strings. (#59058)
+
 2001-09-06  Alex Larsson  <alexl@redhat.com>
 
        * gtk/gtkbin.c:
index d037cd88794970e739071fa7aff4b87b355204a4..90fee00cbd26eef3b1dd03646767038999292259 100644 (file)
@@ -1,3 +1,8 @@
+Fri Sep  7 12:48:56 2001  Matthias Clasen  <matthiasc@poet.de>
+
+       * gdk/x11/gdkkeys-x11.c (get_direction): Don't call
+       g_strcasecmp on NULL strings. (#59058)
+
 2001-09-06  Alex Larsson  <alexl@redhat.com>
 
        * gtk/gtkbin.c:
index d037cd88794970e739071fa7aff4b87b355204a4..90fee00cbd26eef3b1dd03646767038999292259 100644 (file)
@@ -1,3 +1,8 @@
+Fri Sep  7 12:48:56 2001  Matthias Clasen  <matthiasc@poet.de>
+
+       * gdk/x11/gdkkeys-x11.c (get_direction): Don't call
+       g_strcasecmp on NULL strings. (#59058)
+
 2001-09-06  Alex Larsson  <alexl@redhat.com>
 
        * gtk/gtkbin.c:
index d037cd88794970e739071fa7aff4b87b355204a4..90fee00cbd26eef3b1dd03646767038999292259 100644 (file)
@@ -1,3 +1,8 @@
+Fri Sep  7 12:48:56 2001  Matthias Clasen  <matthiasc@poet.de>
+
+       * gdk/x11/gdkkeys-x11.c (get_direction): Don't call
+       g_strcasecmp on NULL strings. (#59058)
+
 2001-09-06  Alex Larsson  <alexl@redhat.com>
 
        * gtk/gtkbin.c:
index d037cd88794970e739071fa7aff4b87b355204a4..90fee00cbd26eef3b1dd03646767038999292259 100644 (file)
@@ -1,3 +1,8 @@
+Fri Sep  7 12:48:56 2001  Matthias Clasen  <matthiasc@poet.de>
+
+       * gdk/x11/gdkkeys-x11.c (get_direction): Don't call
+       g_strcasecmp on NULL strings. (#59058)
+
 2001-09-06  Alex Larsson  <alexl@redhat.com>
 
        * gtk/gtkbin.c:
index d037cd88794970e739071fa7aff4b87b355204a4..90fee00cbd26eef3b1dd03646767038999292259 100644 (file)
@@ -1,3 +1,8 @@
+Fri Sep  7 12:48:56 2001  Matthias Clasen  <matthiasc@poet.de>
+
+       * gdk/x11/gdkkeys-x11.c (get_direction): Don't call
+       g_strcasecmp on NULL strings. (#59058)
+
 2001-09-06  Alex Larsson  <alexl@redhat.com>
 
        * gtk/gtkbin.c:
index e1249cea1cd65aa2a5c78d7ff42d8ac690b90309..63fa3cfb318197c5d4eb0791bb1c4a67e1bf69d6 100644 (file)
@@ -204,16 +204,20 @@ get_direction (void)
 
   XkbGetState (gdk_display, XkbUseCoreKbd, &state_rec);
 
-  name = gdk_atom_name (xkb->names->groups[state_rec.locked_group]);
-  if (g_strcasecmp (name, "arabic") == 0 ||
-      g_strcasecmp (name, "hebrew") == 0 ||
-      g_strcasecmp (name, "israelian") == 0)
-    result = PANGO_DIRECTION_RTL;
-  else
+  if (xkb->names->groups[state_rec.locked_group] == None)
     result = PANGO_DIRECTION_LTR;
+  else
+    {
+      name = gdk_atom_name (xkb->names->groups[state_rec.locked_group]);
+      if (g_strcasecmp (name, "arabic") == 0 ||
+         g_strcasecmp (name, "hebrew") == 0 ||
+         g_strcasecmp (name, "israelian") == 0)
+       result = PANGO_DIRECTION_RTL;
+      else
+       result = PANGO_DIRECTION_LTR;
+      g_free (name);
+    }
     
-  g_free (name);
-
   return result;
 }